package org.mzyyn.qr.service.auction;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.mzyyn.qr.dto.goods.GoodsInfoDTO;
import org.mzyyn.qr.dto.goods.PageQueryDTO;
import org.mzyyn.qr.entity.AuctionGoodsPO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.mzyyn.qr.vo.goods.GoodsInfoVO;
import org.mzyyn.qr.vo.goods.GoodsListVO;

import java.time.LocalDateTime;

/**
 * <p>
 * 拍卖商品表 服务类
 * </p>
 *
 * @author lipeng
 * @since 2024-09-23
 */
public interface AuctionGoodsService extends IService<AuctionGoodsPO> {
    /**
     * 商品列表
     * @param pageQueryDTO
     * @return
     */
    Page<GoodsListVO> pageList(PageQueryDTO pageQueryDTO);

    /**
     * 检查并获取商品
     * @param id
     * @return
     */
    AuctionGoodsPO checkAndGetGoodsById(Long id);

    /**
     * 商品详情
     * @param goodsInfoDTO
     * @return
     */
    GoodsInfoVO goodsInfo(GoodsInfoDTO goodsInfoDTO);

    /**
     * 获取实际结束时间
     * @param goodsId
     * @param endTime
     * @return
     */
    LocalDateTime getEndTime(String goodsId, LocalDateTime endTime);
}
